load("@fbsource//tools/build_defs:rust_library.bzl", "rust_library")

oncall("sapling")

rust_library(
    name = "manifest",
    srcs = glob(["src/**/*.rs"]),
    autocargo = {"cargo_toml_config": {
        "dependencies_override": {"dev-dependencies": {"sapling-types": {
            "default-features": False,
            "features": ["for-tests"],
        }}},
        "extra_buck_dependencies": {"dev-dependencies": [
            "fbsource//third-party/rust:quickcheck",
            "//eden/scm/lib/types:types",
        ]},
        "features": {
            "default": [],
            "for-tests": ["quickcheck"],
        },
        "lib": {"name": "manifest"},
        "package": {
            "authors": ["Meta Source Control Team <sourcecontrol-dev@meta.com>"],
            "homepage": "https://sapling-scm.com/",
            "license": "MIT",
            "name": "sapling-manifest",
            "repository": "https://github.com/facebook/sapling",
        },
    }},
    crate_root = "src/lib.rs",
    features = ["for-tests"],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:quickcheck",
        "//eden/scm/lib/pathmatcher:pathmatcher",
        "//eden/scm/lib/types:types",
    ],
)
